﻿using Admin.Framework.Core.Application.System;
using Admin.Framework.Core.Domain.System;
using Microsoft.AspNetCore.Mvc;

namespace Admin.Framework.Core.WebApi.Controllers
{
    /// <summary>
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ActionLogInfosController : ControllerBase
    {
        private readonly ActionLogInfosApplication _actionLogInfosApplication;

        /// <summary>
        /// </summary>
        /// <param name="actionLogInfosApplication"></param>
        public ActionLogInfosController(ActionLogInfosApplication actionLogInfosApplication)
        {
            _actionLogInfosApplication = actionLogInfosApplication;
        }

        /// <summary>
        ///     获取列表
        /// </summary>
        /// <returns></returns>
        public ActionResult<ActionLogInfos> GetList()
        {
            var list = _actionLogInfosApplication.GetList();
            var result = new {code = 0, msg = "ok", count = list.Count, data = list};
            return new JsonResult(result);
        }
    }
}